package ui.magic.magicui;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import ui.magic.magiclibs.container.Absolute.AbsoluteMagicUi;

public class AbsoluteActivity extends AppCompatActivity implements View.OnClickListener{

    private AbsoluteMagicUi absoluteMagicUi;
    private Button btn;
    private Button btn1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_absolute);
        absoluteMagicUi=(AbsoluteMagicUi)findViewById(R.id.absolute_magic);
        init();
    }

    public void init(){
        btn=new Button(absoluteMagicUi.getContext());
        btn.setOnClickListener(this);
        btn1=new Button(absoluteMagicUi.getContext());
        absoluteMagicUi.addChild(btn,20,20,30,30);
        absoluteMagicUi.addChild(btn1,-10,-10,30,40);
    }

    @Override
    public void onClick(View v) {
        Intent intent=new Intent(AbsoluteActivity.this,MulActivity.class);
        AbsoluteActivity.this.startActivity(intent);
    }
}
